Use the clevis pin with the AK registration#202
Use the clevis pin with the AK registration#202alicefr merged 11 commits intotrusted-execution-clusters:mainfrom
Conversation
|
Set to draft until I fully run the tests locally and fix the linting |
|
The tests passed locally |
attestation-key-register/src/main.rs
Outdated
| let addr = SocketAddr::from(([0, 0, 0, 0], args.port)); | ||
| info!("Listening on {addr}"); | ||
| let addr: SocketAddr = ([0, 0, 0, 0], args.port).into(); | ||
| info!("Listening on {}", addr); |
There was a problem hiding this comment.
nit: not sure why this block is necessary
register-server/src/main.rs
Outdated
| long, | ||
| default_value = "http://attestation-key-register:8001/register-ak" | ||
| )] | ||
| attestation_key_registration_url: String, |
There was a problem hiding this comment.
Should this be mandatory? What about non-AK deployments?
b5a0b55 to
14393ed
Compare
| // let initdata = Initdata { | ||
| // uuid: id.to_string(), | ||
| // }; | ||
| // ... initdata: serde_json::to_string(&initdata)?, |
There was a problem hiding this comment.
No, I also need to put the num_entries. I had some compilation issue
The AK registration endpoint is now part of the clevis pin configuration and it needs to be make configurable via the TEC CR. Signed-off-by: Alice Frosi <afrosi@redhat.com>
We match the attestation keys with the machine using the uuid and not the IP anymore. Therefore, there is a new field uuid in the AK spec and we removed the registration ip from the machine spec. Signed-off-by: Alice Frosi <afrosi@redhat.com>
Signed-off-by: Alice Frosi <afrosi@redhat.com>
The attesation key is now approved if there is an existing machine with the same uuid. Signed-off-by: Alice Frosi <afrosi@redhat.com>
The AK is now registered with the uuid and the public key content. Signed-off-by: Alice Frosi <afrosi@redhat.com>
Now, the clevis pin configuration includea the registration of the attestation key. Signed-off-by: Alice Frosi <afrosi@redhat.com>
Signed-off-by: Alice Frosi <afrosi@redhat.com>
We added a new field in the TEC CRD. Signed-off-by: Alice Frosi <afrosi@redhat.com>
…8e1bf40a0c3e The AK is approved if there is a matching machine with the same uuid. Update the behavior of the tests using the uuid instead of the ip. Signed-off-by: Alice Frosi <afrosi@redhat.com>
We cannot rely anymore on the IP since the machine is now only identified with the uuid. Instead, we now ssh into the VM, fetch the uuid from the clevis header and match the machine with the uuid. Signed-off-by: Alice Frosi <afrosi@redhat.com> Assisted-by: Claude
The new kubevirt image includes the clevis pin with the attestation key registration. Signed-off-by: Alice Frosi <afrosi@redhat.com>
14393ed to
16532b2
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alicefr, Jakob-Naucke The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@Jakob-Naucke let me give a last pass with the tests locally, if they pass I will merge it |
|
The test passed, merging |
5026319
into
trusted-execution-clusters:main
Instead of relying on ignition for the AK registration, now we can use the clevis pin. The major difference is that now the we communicated the uuid for the AK registration, in this way the AK can be matched with the corresponding the machine based on the uuid instead of the ip.